home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.0-d / stk-3 / STk-3.0-doc / Manual / stk.1 next >
Encoding:
Text File  |  1996-01-21  |  9.5 KB  |  313 lines

  1. '\"
  2. '\" File modified by Erick Gallesio for STk man page. Original file Copyright:
  3. '\"
  4. '\" Copyright (c) 1992 The Regents of the University of California.
  5. '\" All rights reserved.
  6. '\"
  7. '\" Permission is hereby granted, without written agreement and without
  8. '\" license or royalty fees, to use, copy, modify, and distribute this
  9. '\" documentation for any purpose, provided that the above copyright
  10. '\" notice and the following two paragraphs appear in all copies.
  11. '\"
  12. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  13. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  14. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  15. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16. '\"
  17. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  18. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  19. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  20. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  21. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  22. '\" 
  23. '\" $Header: /users/eg/STk/STk/Doc/Manual/RCS/stk.1,v 1.2 1996/01/09 23:13:15 eg Exp $ SPRITE (Berkeley)
  24. '/"
  25. .de HS
  26. .ds ^3 \\0
  27. .if !"\\$3"" .ds ^3 \\$3
  28. .if '\\$2'cmds'       .TH \\$1 1 \\*(^3 \\$4
  29. .if '\\$2'lib'        .TH \\$1 3 \\*(^3 \\$4
  30. .if '\\$2'tcl'        .TH \\$1 n \\*(^3 Tcl "Tcl Built-In Commands"
  31. .if '\\$2'tk'         .TH \\$1 n \\*(^3 Tk "Tk Commands"
  32. .if '\\$2'tclc'        .TH \\$1 3 \\*(^3 Tcl "Tcl Library Procedures"
  33. .if '\\$2'tkc'         .TH \\$1 3 \\*(^3 Tk "Tk Library Procedures"
  34. .if '\\$2'tclcmds'         .TH \\$1 1 \\*(^3 Tk "Tcl Applications"
  35. .if '\\$2'tkcmds'         .TH \\$1 1 \\*(^3 Tk "Tk Applications"
  36. .if t .wh -1.3i ^B
  37. .nr ^l \\n(.l
  38. .ad b
  39. ..
  40. '\"    # Start an argument description
  41. .de AP
  42. .ie !"\\$4"" .TP \\$4
  43. .el \{\
  44. .   ie !"\\$2"" .TP \\n()Cu
  45. .   el          .TP 15
  46. .\}
  47. .ie !"\\$3"" \{\
  48. .ta \\n()Au \\n()Bu
  49. \&\\$1    \\fI\\$2\\fP    (\\$3)
  50. .\".b
  51. .\}
  52. .el \{\
  53. .br
  54. .ie !"\\$2"" \{\
  55. \&\\$1    \\fI\\$2\\fP
  56. .\}
  57. .el \{\
  58. \&\\fI\\$1\\fP
  59. .\}
  60. .\}
  61. ..
  62. '\"    # define tabbing values for .AP
  63. .de AS
  64. .nr )A 10n
  65. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  66. .nr )B \\n()Au+15n
  67. .\"
  68. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  69. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  70. ..
  71. '\"    # BS - start boxed text
  72. '\"    # ^y = starting y location
  73. '\"    # ^b = 1
  74. .de BS
  75. .br
  76. .mk ^y
  77. .nr ^b 1u
  78. .if n .nf
  79. .if n .ti 0
  80. .if n \l'\\n(.lu\(ul'
  81. .if n .fi
  82. ..
  83. '\"    # BE - end boxed text (draw box now)
  84. .de BE
  85. .nf
  86. .ti 0
  87. .mk ^t
  88. .ie n \l'\\n(^lu\(ul'
  89. .el \{\
  90. .\"    Draw four-sided box normally, but don't draw top of
  91. .\"    box if the box started on an earlier page.
  92. .ie !\\n(^b-1 \{\
  93. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  94. .\}
  95. .el \}\
  96. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  97. .\}
  98. .\}
  99. .fi
  100. .br
  101. .nr ^b 0
  102. ..
  103. '\"    # VS - start vertical sidebar
  104. '\"    # ^Y = starting y location
  105. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  106. .de VS
  107. .mk ^Y
  108. .ie n 'mc \s12\(br\s0
  109. .el .nr ^v 1u
  110. ..
  111. '\"    # VE - end of vertical sidebar
  112. .de VE
  113. .ie n 'mc
  114. .el \{\
  115. .ev 2
  116. .nf
  117. .ti 0
  118. .mk ^t
  119. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  120. .sp -1
  121. .fi
  122. .ev
  123. .\}
  124. .nr ^v 0
  125. ..
  126. '\"    # Special macro to handle page bottom:  finish off current
  127. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  128. '\"    # page bottom macro.
  129. .de ^B
  130. .ev 2
  131. 'ti 0
  132. 'nf
  133. .mk ^t
  134. .if \\n(^b \{\
  135. .\"    Draw three-sided box if this is the box's first page,
  136. .\"    draw two sides but no top otherwise.
  137. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  138. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  139. .\}
  140. .if \\n(^v \{\
  141. .nr ^x \\n(^tu+1v-\\n(^Yu
  142. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  143. .\}
  144. .bp
  145. 'fi
  146. .ev
  147. .if \\n(^b \{\
  148. .mk ^y
  149. .nr ^b 2
  150. .\}
  151. .if \\n(^v \{\
  152. .mk ^Y
  153. .\}
  154. ..
  155. '\"    # DS - begin display
  156. .de DS
  157. .RS
  158. .nf
  159. .sp
  160. ..
  161. '\"    # DE - end display
  162. .de DE
  163. .fi
  164. .RE
  165. .sp .5
  166. ..
  167. .HS STk cmds 3.0 January_1996
  168. .BS
  169. '\" Note:  do not modify the .SH NAME line immediately below!
  170. .SH NAME
  171. stk, snow \- A Scheme interpreter using the Tk toolkit
  172. .SH SYNOPSIS
  173. \fBstk\fR  [\fIoptions\fR] [\fIarg arg ...\fR]
  174. .br
  175. \fBsnow\fR [\fIoptions\fR] [\fIarg arg ...\fR]
  176. .SH OPTIONS
  177. .LP 
  178. \fBstk\fR interpreter accepts several command-line options which  may
  179. be abbreviated, as long as the abbreviation
  180. is unambiguous (e.g. \fB-h\fR, \fB-he\fR, \fB-hel\fR are three possibe 
  181. abbreviations for the \fB-help\fR option).
  182.  
  183. .IP "\fB\-display \fIdisplay\fR" 15
  184. Display (and screen) on which to display window.
  185. .IP "\fB\-file \fIfileName\fR" 15
  186. Read commands from \fIfileName\fR rather than standard input.  The
  187. last element in \fIfileName\fR will be used as the title for the
  188. application and name of its interpreter for \fBsend\fR
  189. commands (unless overridden by the \fB\-name\fR option\fR).
  190. .IP "\fB\-geometry \fIgeometry\fR" 15
  191. Initial geometry to use for window.
  192. .IP "\fB\-name \fIname\fR" 15
  193. Use \fIname\fR as the title to be displayed in the window, and
  194. as the name of the interpreter for \fBsend\fR commands.
  195. .IP "\fB\-sync\fR" 15
  196. Execute all X server commands synchronously, so that errors
  197. are reported immediately.  This will result in much slower
  198. execution, but it is useful for debugging.
  199. .IP "\fB\-no-tk\fR" 15
  200. Don't initialize the Tk toolkit
  201. .IP "\fB\-load \fIfileName\fR" 15
  202. Evaluate expressions contained in \fIfileName\fR before reading 
  203. expressions from standard input.
  204. .IP "\fB\-image \fIfileName\fR" 15
  205. Restore the state saved in \fIfileName\fR by the \fIdump\fR primitive
  206. (Note: For now, \fIdump\fR works only on SunOS 4.1.x, Linux 1.x (a.out format) 
  207. and FreeBSD).
  208. .IP "\fB\-cells \fInumber\fR" 15
  209. Set the default size for the heap to \fInumber\fR cells. The given number is
  210. also the amount of cells used when extending the heap. Default value is 20000.
  211. .IP "\fB\-interactive\fR" 15
  212. Tell the interpreter that it is used interactively (even if it doesn't
  213. think so).  
  214. .IP "\fB\-help\fR" 15
  215. Print a summary of the command-line options and exit.
  216. .BE
  217.  
  218. .SH DESCRIPTION 
  219. .PP 
  220.  
  221. \fBStk\fR is a Scheme R4RS interpreter which provide a simple access to the
  222. X11 Tk toolkit. If the \fB\-no-tk\fR option is provided to the interpreter,
  223. the Tk library is not initialized and no main window is created.  If
  224. \fBstk\fR is invoked with no \fB\-f\fR option then it reads Scheme
  225. expressions interactively from standard input.  It will continue processing
  226. commands until all windows have been deleted or until end-of-file is
  227. reached on standard input.
  228.  
  229. .PP 
  230. \fBSnow\fR is a \fIlight\fR version of the \fBstk\fR interpreter which
  231. does not provide support for the Tk toolkit. This interpreter does not
  232. recognize the options \fB\-display\fR, \fB\-geometry\fR, \fB\-sync\fR and
  233. \fB\-no-tk\fR which are meaningless without Tk. This interpreter is called,
  234. rather than the standard one, when the shell DISPLAY variable is not
  235. initialized.
  236.  
  237. .PP
  238. If the \fB\-file\fR option is provided to Tk, then \fBstk\fR reads Scheme
  239. forms from the file named in the \fB\-file\fR option.  These
  240. forms will normally create an interactive interface consisting
  241. of one or more widgets.  When the end of the command file is
  242. reached, \fBstk\fR will continue to respond to X events until
  243. all windows have been deleted.
  244.  
  245. .PP 
  246. The \fB\-interactive\fR option forces the interpreter in interactive
  247. mode. In this mode, standard output and standard error are unbuffered. 
  248. Use this option when you launch \fBstk\fR from \fBemacs\fR.
  249.  
  250.  
  251. .SH "VARIABLES"
  252. .PP
  253. Following Scheme variables are set when \fBStk\fR starts:
  254. .TP 15
  255. \fB*argc*\fR
  256. Contains a count of the number of \fIarg\fR arguments (0 if none),
  257. not including the options described above.
  258. .TP 15
  259. \fB*argv*\fR
  260. Contains a Scheme list whose elements are the \fIarg\fR arguments (not
  261. including the options described above), in order, or an empty list
  262. if there are no \fIarg\fR arguments.
  263. .TP 15
  264. \fB*program-name*\fR
  265. Contains \fIfileName\fR if it was specified.
  266. Otherwise, contains the name by which \fBstk\fR was invoked.
  267.  
  268.  
  269. .SH "SCRIPT FILES"
  270. .PP
  271. If you create a STk script in a file whose first line is
  272. .DS
  273. \fB#!/usr/local/bin/stk -f\fR
  274. .DE
  275. then you can invoke the script file directly from your shell if
  276. you mark it as executable.
  277. This assumes that \fBstk\fR has been installed in the default
  278. location in /usr/local/bin;  if it's installed somewhere else
  279. then you'll have to modify the above line to match.
  280.  
  281. .SH ENVIRONMENT VARIABLES
  282. .PP
  283. \fBstk\fR uses the following shell variables:
  284. .IP "\fISTK_LIBRARY\fI" 15
  285. This variable indicates where the library files are located. This variable
  286. allows to overload the default value of the Scheme variable \fI*stk-library*\fR 
  287. which is automatically calculated by the interpreter.(i.e. \fIstk\fR or \fIsnow\fR).
  288. .IP "\fISTK_LOAD_PATH\fI" 15
  289. This variable serves to initialize the \fI*load-path*\fR Scheme variable. This
  290. variable is a list of paths to try when in a load command. 
  291. .IP "\fISTK_HELP_PATH\fI" 15
  292. This variable serves to initialize the \fI*help-path*\fR Scheme variable. It 
  293. must contain a list of documentation directories. This variable is used by the help 
  294. procedure.
  295.  
  296.  
  297. .SH FILES
  298. .IP "\fI./init.stk\fI" 15
  299. .IP "\fI$STk_LIBRARY/STk/init.stk\fI" 15
  300. When \fBstk\fR starts running, it tries to load the file \fIinit.stk\fR
  301. in the current directory. If this file is not present, it tries to load 
  302. this file in the \fBSTk_LIBRARY\fR directory (the value of \fBSTk_LIBRARY\fR
  303. is automatically computed to be in a sibling directory of the interpreter 
  304. executable.
  305.  
  306. .IP "\fI~/.stkrc\fI" 15
  307. Standard \fIinit.stk\fR file tries to load the file \fI~/.stkrc\fR. This file 
  308. can be used to store function definitions or variables settings that you want
  309. to be executed at each interpretater invocation.
  310.  
  311. .SH SEE ALSO
  312. wish(1)
  313.